Get curvature map of scene05

count curvature map for k2 only

Contents

read points and curvatures

model_file_name='../scans/res_s05.asc';
a=load(model_file_name,'-ascii');
mP=a(:,1:3);
mK=a(:,13:14);
clear a;

remove unrelevant data

good=find(mK(:,1)~=-789);
K=mK(good,:);
P=mP(good,:);

get h_widow width

h=0.04*sqrt(sum((max(K)-min(K)).^2));

run FAMS

tic
[modes, p_modes, w_modes]=fams(K(:,2),20,15,100,'mKdata','res/','-h',h);
toc
Load data points from matlab ...done
RunFAMS with res/pilot_100_mKdata.txt ...
Running FAMS with K=20 L=15
 Run pilot fixed bandwith...done.
 Start MS iterations...........done.
 Join Modes with adaptive h/2, min pt=40, jump=5
            pass 1done
            pass 2...........nrel 2
0 0
1 1
done
Save convergence points   ...done
Save joined convergence points ...done
Save indicies of modes  ...done
FAMS done.
Elapsed time is 1.235000 seconds.

analyse results

format short g;
p_modes
r=-1e+4./p_modes(:,2)

figure(1),clf,hold on;
plot3(P(:,1),P(:,2),P(:,3),'.'),axis equal,view(2);

ind_mode1=find(w_modes==1);
plot3(P(ind_mode1,1),P(ind_mode1,2),P(ind_mode1,3),'.r');

ind_mode2=find(w_modes==2);
plot3(P(ind_mode2,1),P(ind_mode2,2),P(ind_mode2,3),'.g');

ind_mode3=find(w_modes==3);
plot3(P(ind_mode3,1),P(ind_mode3,2),P(ind_mode3,3),'.k');
p_modes =
        22114      -0.1491
        18803      -0.6484
r =
        67067
        15423